home *** CD-ROM | disk | FTP | other *** search
/ Champak 103 / Vol 103.iso / games / tontie_h.swf / scripts / DefineSprite_173 / frame_21 / DoAction.as
Text File  |  2010-03-13  |  511b  |  31 lines

  1. e_all = [1,2,3,4,5,6,7,8,9];
  2. e = [];
  3. i = 1;
  4. while(i <= 9)
  5. {
  6.    targ = Math.floor(Math.random() * e_all.length);
  7.    e.push(e_all[targ]);
  8.    e_all.splice(targ,1);
  9.    i++;
  10. }
  11. no = 0;
  12. i = 0;
  13. while(i < 9)
  14. {
  15.    if(eval("_root.enemy" + e[i]) == 0)
  16.    {
  17.       set("_root.enemy" + e[i],1);
  18.       set("_root.henkan" + e[i],name);
  19.       set("_root.henkan" + name,e[i]);
  20.       henkan = e[i];
  21.       _root.mogura_on += 1;
  22.       break;
  23.    }
  24.    no += 1;
  25.    i++;
  26. }
  27. if(no >= 9)
  28. {
  29.    henkan = name;
  30. }
  31.